import { service } from '@/service'

export const sorgList = (data?: any) => {
  return service.request({
    url: 'hbsys-system/sorg/list',
    method: 'POST',
    data
  })
}

//参数
export const getManagerChild = (enName?: any) => {
  return service.request({
    url: `hbsys-system/sysParameter/getManagerChild/${enName}`,
    method: 'get'
  })
}

export const riskTypeSortRisk = () => {
  return service.request({
    url: `hbsys-system/risk/riskTypeSort`,
    method: 'get'
  })
}

export const riskTypeSortProblem = (type?: any) => {
  return service.request({
    url: `hbsys-system/problem/riskTypeSort/${type}`,
    method: 'get'
  })
}

export const addOrUpd = (data?: any) => {
  return service.request({
    url: `hbsys-system/spotItem/addOrUpd`,
    method: 'POST',
    data
  })
}

export const userList = (params?: any) => {
  return service.request({
    url: `hbsys-system/user/list`,
    method: 'get',
    params
  })
}

export const soptCheckAdd = (data?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/add`,
    method: 'post',
    data
  })
}

export const soptCheckPage = (data?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/page`,
    method: 'post',
    data
  })
}

export const noticePage = (data?: any) => {
  return service.request({
    url: `hbsys-system/notice/page`,
    method: 'post',
    data
  })
}

export const getNoticeOne = (data?: any) => {
  return service.request({
    url: `hbsys-system/notice/getNoticeOne`,
    method: 'post',
    data
  })
}

export const soptCheckDel = (data?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/del`,
    method: 'post',
    data
  })
}

export const soptCheckImport = (data?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/import`,
    method: 'post',
    data
  })
}

export const downloadExcelTemplate = (params?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/downloadExcelTemplate`,
    method: 'get',
    params,
    responseType: 'blob'
  })
}

export const soptCheckLedger = (params?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/ledger`,
    method: 'get',
    params,
    responseType: 'blob'
  })
}

export const statistics = (params?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/statistics`,
    method: 'get',
    params
  })
}

export const areaCount = (params?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/areaCount`,
    method: 'get',
    params
  })
}

export const sorgInfoByArea = (data?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/sorgInfoByArea`,
    method: 'post',
    data
  })
}

export const sorgInfoByLevel = (data?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/sorgInfoByLevel`,
    method: 'post',
    data
  })
}

export const dpcontRisk = (data?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/risk`,
    method: 'POST',
    data
  })
}

export const riskCount = (params?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/riskCount`,
    method: 'get',
    params
  })
}

export const dpcontSorgInfo = (data?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/sorgInfo`,
    method: 'post',
    data
  })
}

export const sorgInfoByTime = (data?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/sorgInfoByTime`,
    method: 'post',
    data
  })
}

export const dpcontTodayAdd = (params?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/todayAdd`,
    method: 'get',
    params
  })
}

export const statisticsRight = (params?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/statisticsRight`,
    method: 'get',
    params
  })
}

export const planPage = (data?: any) => {
  return service.request({
    url: `hbsys-system/plan/page`,
    method: 'post',
    data
  })
}

export const planDel = (data?: any) => {
  return service.request({
    url: `hbsys-system/plan/del`,
    method: 'post',
    data
  })
}

export const planAddOrUpd = (data?: any) => {
  return service.request({
    url: `hbsys-system/plan/addOrUpd`,
    method: 'post',
    data
  })
}

export const soptCheckDetail = (sorgSpotCheckId: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/detail`,
    method: 'post',
    data: {
      sorgSpotCheckId
    }
  })
}

export const soptCheckUpd = (data?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/upd`,
    method: 'post',
    data
  })
}

export const problemRectify = (data?: any) => {
  return service.request({
    url: `hbsys-system/problem/rectify`,
    method: 'post',
    data
  })
}

export const problemNoRectigy = (data?: any) => {
  return service.request({
    url: `hbsys-system/problem/noRectify`,
    method: 'post',
    data
  })
}

export const problemAddOrUpd = (data?: any) => {
  return service.request({
    url: `hbsys-system/problem/addOrUpd`,
    method: 'post',
    data
  })
}

export const problemEditOrUpd = (id, data?: any) => {
  return service.request({
    url: `hbsys-system/problem/addOrUpd`,
    method: 'post',
    data: {
      ...data,
      sorgProblemId: id
    }
  })
}

export const problemDetail = (data?: any) => {
  return service.request({
    url: `hbsys-system/problem/detail`,
    method: 'post',
    data
  })
}
export const problemDetailId = (sorgProblemId?: any) => {
  return service.request({
    url: `hbsys-system/problem/detail`,
    method: 'post',
    data: {
      sorgProblemId
    }
  })
}
export const problemPage = (data?: any) => {
  return service.request({
    url: `hbsys-system/problem/page`,
    method: 'post',
    data
  })
}

export const problemImport = (data?: any) => {
  return service.request({
    url: `hbsys-system/problem/import`,
    method: 'post',
    data
  })
}

export const problemDownloadExcelTemplate = (params?: any) => {
  return service.request({
    url: `hbsys-system/problem/downloadExcelTemplate`,
    method: 'GET',
    params,
    responseType: 'blob'
  })
}

export const problemLedger = (params?: any) => {
  return service.request({
    url: `hbsys-system/problem/ledger`,
    method: 'GET',
    params,
    responseType: 'blob'
  })
}

export const problemDel = (data?: any) => {
  return service.request({
    url: `hbsys-system/problem/del`,
    method: 'post',
    data
  })
}

export const problemConfirm = (data?: any) => {
  return service.request({
    url: `hbsys-system/problem/confirm`,
    method: 'post',
    data
  })
}

export const problemChange = (data?: any) => {
  return service.request({
    url: `hbsys-system/problem/change`,
    method: 'post',
    data
  })
}

//消息公开
export const msgAddOrUpd = (data?: any) => {
  return service.request({
    url: `hbsys-system/msg/addOrUpd`,
    method: 'post',
    data
  })
}
//消息公开
export const msgRelease = (data?: any) => {
  return service.request({
    url: `hbsys-system/msg/release`,
    method: 'post',
    data
  })
}

export const msgLedger = (params?: any) => {
  return service.request({
    url: `hbsys-system/msg/ledger`,
    method: 'get',
    params,
    responseType: 'blob'
  })
}

export const msgPage = (data?: any) => {
  return service.request({
    url: `hbsys-system/msg/page`,
    method: 'post',
    data
  })
}

export const msgDetail = (data?: any) => {
  return service.request({
    url: `hbsys-system/msg/detail`,
    method: 'post',
    data
  })
}

export const msgDel = (data?: any) => {
  return service.request({
    url: `hbsys-system/msg/del`,
    method: 'post',
    data
  })
}

export const riskAddOrUpd = (data?: any) => {
  return service.request({
    url: `hbsys-system/risk/addOrUpd`,
    method: 'post',
    data
  })
}

export const competentDeptInfo = (params?: any) => {
  return service.request({
    url: `hbsys-system/risk/competentDeptInfo`,
    method: 'get',
    params
  })
}

export const riskPage = (data?: any) => {
  return service.request({
    url: `hbsys-system/risk/page`,
    method: 'post',
    data
  })
}

export const eventSendPage = (data?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/eventSendPage`,
    method: 'post',
    data
  })
}

export const eventSend = (data?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/eventSend`,
    method: 'post',
    data
  })
}

export const njjlPage = (data?: any) => {
  return service.request({
    url: `hbsys-system/risk/njjlPage`,
    method: 'post',
    data
  })
}

export const riskList = (data?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/riskList`,
    method: 'post',
    data
  })
}

export const riskDetail = (data?: any) => {
  return service.request({
    url: `hbsys-system/risk/detail`,
    method: 'post',
    data
  })
}

export const riskHandle = (data?: any) => {
  return service.request({
    url: `hbsys-system/risk/handle`,
    method: 'post',
    data
  })
}

export const riskChange = (data?: any) => {
  return service.request({
    url: `hbsys-system/risk/change`,
    method: 'post',
    data
  })
}

export const riskLedger = (params?: any) => {
  return service.request({
    url: `hbsys-system/risk/ledger`,
    method: 'get',
    params,
    responseType: 'blob'
  })
}

export const handlerAdd = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/add`,
    method: 'post',
    data
  })
}

export const handlerUpd = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/upd`,
    method: 'post',
    data
  })
}

export const handlerPage = (data?: any) => {
  return service.request({
    url: `/hbsys-system/handler/page`,
    method: 'post',
    data
  })
}

export const handlerTakePart = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/takePart`,
    method: 'post',
    data
  })
}

export const handlerMytask = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/mytask`,
    method: 'post',
    data
  })
}

export const handlerDetail = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/detail`,
    method: 'post',
    data
  })
}

export const authCustom = (data?: any) => {
  return service.request({
    url: `hbsys-system/ca/auth/custom`,
    method: 'post',
    data
  })
}

export const getType = (sorgId?: any) => {
  return service.request({
    url: `hbsys-system/sorg/getType`,
    method: 'post',
    data: {
      id: sorgId
    }
  })
}

export const handlerDel = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/del`,
    method: 'post',
    data
  })
}

export const handlerHandle = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/handle`,
    method: 'post',
    data
  })
}

export const handlerFlowHistory = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/flowHistory`,
    method: 'post',
    data
  })
}

export const handlerFlow = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/flow`,
    method: 'post',
    data
  })
}

export const handlerBack = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/back`,
    method: 'post',
    data
  })
}

export const handlerTransfer = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/transfer`,
    method: 'post',
    data
  })
}

export const handlerAddComment = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/addComment`,
    method: 'post',
    data
  })
}

export const intelligent = (data?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/intelligent`,
    method: 'post',
    data
  })
}

export const intelligentGet = (data?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/intelligentGet`,
    method: 'post',
    data
  })
}

export const intelligentSave = (data?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/intelligentSave`,
    method: 'post',
    data
  })
}

export const changeAnother = (data?: any) => {
  return service.request({
    url: `hbsys-system/soptCheck/changeAnother`,
    method: 'post',
    data
  })
}

export const msgLeftList = (data?: any) => {
  return service.request({
    url: `hbsys-system/msg/leftList`,
    method: 'post',
    data
  })
}

export const msgDraft = (data?: any) => {
  return service.request({
    url: `hbsys-system/msg/draft`,
    method: 'post',
    data
  })
}
// export const msgDetail = (data?: any) => {
//   return service.request({
//     url: `hbsys-system/msg/detail`,
//     method: 'post',
//     data
//   })
// }

export const handleSort = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/handleSort`,
    method: 'post',
    data
  })
}

export const handleSortDetail = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/handleSortDetail`,
    method: 'post',
    data
  })
}

export const ledgerSort = (params?: any) => {
  return service.request({
    url: `hbsys-system/handler/ledgerSort`,
    method: 'get',
    params,
    responseType: 'blob'
  })
}

export const queryByPage = (params?: any) => {
  return service.request({
    url: `hbsys-system/annualActivity/queryByPage`,
    method: 'get',
    params
  })
}

export const actSort = (data?: any) => {
  return service.request({
    url: `hbsys-system/dpcont/actSort`,
    method: 'post',
    data
  })
}

//综合画像
export const portrait = (params?: any) => {
  return service.request({
    url: `/hbsys-system/organization/admin/portrait`,
    method: 'GET',
    params
  })
}

export const riskLevelDay = () => {
  return service.request({
    url: `hbsys-system/handler/riskLevelDay`,
    method: 'post'
  })
}

export const riskLevelDayUpdate = (data?: any) => {
  return service.request({
    url: `hbsys-system/handler/riskLevelDayUpdate`,
    method: 'post',
    data
  })
}

export const dpcont = () => {
  return service.request({
    url: `hbsys-system/dpcont/v1`,
    method: 'get'
  })
}

export const riskTypeSort = () => {
  return service.request({
    url: `hbsys-system/dpcont/riskTypeSort`,
    method: 'get'
  })
}

export const check = () => {
  return service.request({
    url: `hbsys-system/organization/admin/pc/annual/check`,
    method: 'get'
  })
}

export const rankingHttp = () => {
  return service.request({
    url: `hbsys-system/organization/admin/pc/annual/ranking`,
    method: 'get'
  })
}

export const countHttp = () => {
  return service.request({
    url: `hbsys-system/organization/admin/pc/annual/count`,
    method: 'get'
  })
}

export const dpcontV2 = () => {
  return service.request({
    url: `hbsys-system/dpcont/v2`,
    method: 'get'
  })
}

export const publicize = () => {
  return service.request({
    url: `hbsys-system/organization/admin/pc/annual/publicize`,
    method: 'get'
  })
}

export const annualCheck = () => {
  return service.request({
    url: `hbsys-system/organization/admin/pc/annual/check`,
    method: 'get'
  })
}

export const NJJLLBZT = (data) => {
  return service.request({
    url: `hbsys-system/dpcont/NJJLLBZT?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    data
  })
}

export const queryDJFGL = (data) => {
  return service.request({
    url: `hbsys-system/dpcont/queryDJFGL?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    data
  })
}

export const NJJLWNJ = (data) => {
  return service.request({
    url: `hbsys-system/dpcont/NJJLWNJ?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    data
  })
}

export const NJJLWNJAll = (data) => {
  return service.request({
    url: `hbsys-system/dpcont/NJJLWNJAll`,
    method: 'post',
    data
  })
}

export const cldzu = (data) => {
  return service.request({
    url: `hbsys-system/dpcont/cldzu?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    data
  })
}

export const yjcldzu = (data) => {
  return service.request({
    url: `hbsys-system/dpcont/yjcldzu?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    data
  })
}

export const yjcldzuc = (data) => {
  return service.request({
    url: `hbsys-system/dpcont/yjcldzuc?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    data
  })
}

export const ygpblly = (data) => {
  return service.request({
    url: `hbsys-system/dpcont/ygpblly?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    data
  })
}

export const ypblly = (data) => {
  return service.request({
    url: `hbsys-system/dpcont/ypblly?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    data
  })
}

export const wpblly = (data) => {
  return service.request({
    url: `hbsys-system/dpcont/wpblly?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    data
  })
}
